/*
 * Copyright 2016 Wealth Inc. All rights reserved.
 */
 package com.wealth.commodity.entity;


import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.wealth.member.entity.Member;

@Entity
@Table(name = "commodity_goods_purrestrictions")
public class Purrestrictions implements Serializable {
	
	private static final long serialVersionUID = 1L;
	
	private Long id;
	private Member member;
	private Goods goods;
	private Date createtime;
	private Integer amount;
	
	
	
	/* ---------------- method ----------------*/
	
	public Purrestrictions(){
	}

	public Purrestrictions(Long id){
		this.id = id;
	}

	/* ---------------- getter/setter ----------------*/
	
	
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	public Long getId() {
		return id;
	}
	
	public void setId(Long id) {
		this.id = id;
	}
	
	
	
	@Column(name = "createTime")
	public Date getCreatetime() {
		return createtime;
	}
	@ManyToOne
	@JoinColumn(name="memberid")
	public Member getMember() {
		return member;
	}
	public void setMember(Member member) {
		this.member = member;
	}
	@ManyToOne
	@JoinColumn(name="goodsId")
	public Goods getGoods() {
		return goods;
	}

	public void setGoods(Goods goods) {
		this.goods= goods;
	}

	public void setCreatetime(Date createtime) {
		this.createtime = createtime;
	}
	
	@Column(name = "amount")
	public Integer getAmount() {
		return amount;
	}
	
	public void setAmount(Integer amount) {
		this.amount = amount;
	}
	
	
}



